package com.sapient.mompoc.model;

import java.io.Serializable;

/**
 * Defines a Line Item of an Order
 * 
 * @author asudar
 * 
 */

public class LineItem implements Serializable {
	private static final long serialVersionUID = -4371321791581450135L;

	private Long id;

	private Product product;

	private int quantity;

	public LineItem() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Product getProduct() {
		return product;
	}

	/**
	 * @return the quantity
	 */
	public int getQuantity() {
		return quantity;
	}

	/**
	 * @param quantity
	 *            the quantity to set
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("LineItem [id=");
		builder.append(id);
		builder.append(", product=");
		builder.append(product);
		builder.append(", quantity=");
		builder.append(quantity);
		builder.append("]");
		return builder.toString();
	}

}
